import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

//element
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//elementui 语言
import locale from 'element-ui/lib/locale/lang/zh-CN'


//全局样式
import '@/styles/index.scss'
//引入iconfont
import "@/assets/iconfont/iconfont.js";

import App from './App'
import store from './store'
import router from './router'

//全局注册自定义iconfont组件
import iconfont from "@/components/iconfont.vue";
Vue.component("iconfont", iconfont)


import UserInfo from "@/components/userInfo/userInfo";
Vue.component("UserInfo", UserInfo)

import '@/icons' // icon
import '@/permission' // permission control

//全局引入echarts
import echarts from "echarts";
Vue.prototype.$echarts = echarts;

//设置element的语言和默认大小
Vue.use(ElementUI, { locale, size: 'small' })

import permission from './components/Permission'
Vue.use(permission)

import request from '@/utils/request'
import config from '@/utils/config'
Vue.prototype.$request = request
Vue.prototype.$config = config

Vue.config.productionTip = false

//挂载
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
